gcc9_warnings
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 15 Aug 2019 14:15:39 +0000 (15:15 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 15 Aug 2019 14:15:39 +0000 (15:15 +0100)
Gbp-Pq: Name gcc9_warnings.diff

mkspecs/features/qt_common.prf
mkspecs/features/qt_module_headers.prf

index 415044bb645d2d1fea9e2894db82c7716ef5bf2d..c9267413393c19959cacb547c787b9d277ffa078 100644 (file)
@@ -75,6 +75,14 @@ clang {
     greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
     # GCC 7 has a lot of false positives relating to this, so disable completely
     greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
+    # GCC 9 has a lot of false positives relating to this, so disable completely
+    greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
+    # GCC 9 introduced this
+    greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move
+    # GCC 9 introduced this
+    greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
+    # GCC 9 introduced this
+    greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime
 }
 
 warnings_are_errors:warning_clean {
@@ -113,7 +121,14 @@ warnings_are_errors:warning_clean {
 
             # GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs.
             greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough
-
+            # GCC 9 has a lot of false positives relating to this, so disable completely
+            greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
+            # GCC 9 introduced this
+            greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move
+            # GCC 9 introduced this
+            greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
+            # GCC 9 introduced this
+            greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime
             # Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
             android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
         }
index 70d3520e5c4ba038226d4453e684af84d868feae..6b4b9143fa5f5aaf5e93b8d6926f44021150c5a8 100644 (file)
@@ -239,6 +239,14 @@ headersclean:!internal_module {
                 gcc_ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
                 versionAtLeast(gcc_ver, 4.5): hcleanFLAGS += -Wdouble-promotion
                 versionAtLeast(gcc_ver, 4.9): hcleanFLAGS += -Wfloat-conversion
+                # GCC 9 has a lot of false positives relating to this, so disable completely
+                greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-deprecated-copy
+                # GCC 9 introduced this
+                greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-redundant-move
+                # GCC 9 introduced this
+                greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-format-overflow
+                # GCC 9 introduced this
+                greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-init-list-lifetime
 
                 c++11 {
                     # only enabled for actual c++11 builds due to